The present invention relates to a data processing system where a plurality of data processing applications are arranged so that they may communicate with each other. More specifically, the invention relates to trace facilities, whereby errors that occur during data processing within such a system can be identified for correction.
Tracing routines in computer software have been provided in the prior art for the purpose of tracing through a program (also referred to herein as an xe2x80x9capplicationxe2x80x9d) to assist in locating errors (also known as xe2x80x9cbugsxe2x80x9d) therein. Tracing assists in the determination of problems by providing a snapshot record in storage of certain types of states existing when a location in a program is reached by the data processor that is running the program. A tracing routine records in storage certain events or states that take place during the running of an application. Such events or states are often stored in a trace table in memory.
It has become very common to link up (e.g., via a network (such as the Internet, for example) a plurality of data processing applications so that they may communicate with each other to thus distribute a large data processing task over several data processing applications. For example, a customer wishes to buy and sell shares over the Internet. The customer runs a Web browser application on his home personal computer, the stock broker runs a Web server application on a larger midrange computer and a transaction processing application is running on a backend mainframe computer. These three applications communicate with each other over a network (or series of connected networks) in order to exchange data messages, which can consist of requests for processing or replies containing the results of processing. In another example, the applications can be all running on the same machine, or two applications can be running on one machine and a third on a second machine.
In order to carry out tracing on such a system of linked data processing applications, one prior art technique involves each application providing its own tracing facility such that events/states occurring for each application are logged separately into a tracing table that is unique for that application. However, if something goes wrong during the running of the plurality of applications, each of the separate trace tables must be located, examined and compared with the other trace tables in order to diagnose the reason for the problem. This can be very burdensome, especially as the number of communicating applications increases.
Another prior art technique involves setting a flag at the receiving application to inform the receiving application of what kinds of incoming messages from other applications should be traced (e.g., a certain flag could mean xe2x80x9clog all messages of type xe2x80x9cfooxe2x80x9d from destination application xe2x80x9cbarxe2x80x9d). Once a receiving application receives a message that satisfies the set flag, the receiving application communicates with a central monitoring point for centralized logging of this event (the receipt of the message that satisfies the flag). This solves the above problem by centralizing the trace table into a single location, with each application using the same trace table. However, this gives limited control over which messages should be logged (the criteria is statically set at the receiver at a given point in time), thus resulting in an over-inclusive operation whereby the centralized log stores much more information than is necessary.
According to one aspect, the present invention provides in a data processing system wherein a plurality of data processing applications are in communication with each other, a first data processing apparatus running a first data processing application, the apparatus has: a means for receiving a message from a second data processing apparatus running a second data processing application; a means for determining whether a predetermined indication is provided in the received message; and a means for reporting the receipt of the received message to a central logging trace facility for logging of the message when the predetermined indication is provided in the received message.
According to a second aspect, the present invention provides in a data processing system wherein a plurality of data processing applications are in communication with each other, a first data processing apparatus running a first data processing application, the apparatus has: a means for determining whether receipt of a message to be sent to a second data processing apparatus running a second data processing application should be logged into a central logging trace facility; a means for providing a predetermined indication in the message when the means for determining determines that the message should be logged into the central facility; and a means for sending the message to the second data processing apparatus running the second data processing application.
According to third and fourth aspects, the present invention provides methods of carrying out the functions described above with respect to the first and second aspects, respectively.
According to fifth and sixth aspects, the present invention provides computer program products stored on a computer readable storage media for, when run on a computer, carrying out the functions described above with respect to the first and second aspects.
Therefore, with the present invention, by the use of the indication (e.g., flag) carried in the data message sent to a receiving application from a sending application, the sending application can decide, on a dynamic basis, which messages should be logged by the receiving application into the centralized monitoring point. This operation is dynamic (also called xe2x80x9con the flyxe2x80x9d) in the sense that should the sending application make a quick decision that a particular message should be logged, even though previous communication between the applications would suggest that logging should not take place, the sending application can set a flag in the message to inform the receiving application that this message should be logged.
This provides a high level of dynamic control over exactly which messages should be logged, thus greatly reducing the amount of information contained in the log, in turn making it much quicker and easier to study the centralized log to determine what went wrong when a problem has occurred.